import React from "react";

function addPrefix(item){
    if(item.path){
        return {
            ...item,
            path:"/wx/"+item.path,
            key:"/wx/"+item.path,
        }
    }
}
export const mlist = [{
    label:"注册保洁",
    path:"bjRegister",
},{
    label:"注册茶艺师",
    path:"cysRegister",
},{
    label:"订单列表",
    path:"cysOrderList",
},{
    label:"个人中心",
    path:"cysInfo",
},{
    label:"绑定微信",
    path:"bindAccount",
}].map(addPrefix);
const routers= () =>{

    return mlist.map(item=>{
        return {
            path:item.path,
            ele:React.lazy(() => import("../pages/wx/"+(item.path.replace("/wx/",""))))
        }
    })
}

export default routers